/**
 * Created by sky on 2019/3/13.
 */
layui.define(function (exports) {
    var obj_msg_type = {
        0: 'Ping',
        99: 'Pong',
        100: 'ErrorST',
        1: 'AuthReq',
        2: 'AuthResp',
        3: 'InTopicReq',
        4: 'PresenceNT',
        5: 'ChatReq',
        6: 'ChatReqAck',
        7: 'ChatNT',
        8: 'ChatNTAck'
    };

    const Msg_TYPE = {
        Ping: 0, //服务端存活探测探测
        Pong: 99,//对时
        ErrorST: 100,//错误码
        AuthReq: 1,//用户认证
        AuthResp: 2,
        InTopicReq: 3,
        PresenceNT: 4,
        ChatReq: 5,
        ChatReqAck: 6,
        ChatNT: 7,
        ChatNTAck: 8
    };
    Object.freeze(Msg_TYPE);


    const TOPIC_TYPE = {
        PRIVATE: 0, //私聊
        GROUP: 1 //群聊
    };
    Object.freeze(TOPIC_TYPE);

    const PAY_TYPE = {
        Alipay: 1, //支付宝充值
        WeChat: 2, //微信充值
        Bank: 3, //银行卡充值
        Flower: 4, //花呗充值
        CreditAlipay: 5, //信用卡（支）
        CreditWechat: 6, //信用卡（微）
        AlipayAuto: 7, //支付宝自助
        WechatAuto: 8, //微信自助
        BankAuto: 9 //银行卡自助

    };
    Object.freeze(PAY_TYPE);

    var justchatModel = {
        Msg_TYPE: Msg_TYPE,
        TOPIC_TYPE: TOPIC_TYPE,
        obj_msg_type: obj_msg_type,
        curTopic: null,
        PAY_TYPE: PAY_TYPE
    };

    exports('justchatModel', justchatModel);
});